package com.jiuqian.common.core.exception;

import com.jiuqian.common.core.config.Resources;

public class ExceptionFactory {
	
	public static BusinessException create(String errorCode, String... args) {
		String exceptionPattern = Resources.getErrorMessage(errorCode, args);
		return new BusinessException(errorCode, exceptionPattern);
//		if (args != null && args.length > 0) {
//			String errorMsg = String.format(exceptionPattern, args);
//			return new BusinessException(errorCode, errorMsg);
//		}
	}
}
